project(omap35xx)

cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})

set(ARCH "x86" CACHE STRING "build programs to run on ARCH")

if (ARCH STREQUAL "x86")
    find_package(GTK2 REQUIRED)
    find_package(LibXml2 REQUIRED)
    mark_as_advanced(   GTK2_INCLUDE_DIRS   GTK2_LIBRARIES  )
    include_directories(    ${GTK2_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIR}
        )
    target_link_libraries(  ${PROJECT_NAME}
        ${GTK2_LIBRARIES}
        ${LIBXML2_LIBRARIES}
        X11
        Xtst
        fakekey
        )
elseif(ARCH STREQUAL "arm")
    add_definitions(-DARM)
    set(sysroot "/home/jake/lib/sysroots/armv7a-angstrom-linux-gnueabi")
    set(inc_dir "${sysroot}/usr/include")
    #include_directories()
    set(lib_dir "${sysroot}/usr/lib")
    #target_link_libraries( ${PROJECT_NAME})
endif()
